function add(e) {
	var url = _EDIT_EMPLOYEEROLE_URL;
	url = url + "?add=" + 1;
	if ($.stopQuickHit($(e))) {
		$.go(url, {
			dataType : 'html',
			beforeSend:function(){
				showProccessBar();
			},
			success : function(data, textStatus) {
				replaceDocument(url, data);
			},
			error:function(){
				hideProccessBar();
			}
		});
	}
}

function showDetail(cid, employeeId , e) {
	if($.stopQuickHit(e)){
		var url = _SHOW_EMPLOYEEROLE_URL;
		$.go(url, {
			data : {
				cid : cid,
				employeeId : employeeId
			},
			dataType : 'html',
			beforeSend:function(){
				showProccessBar();
			},
			success : function(data, textStatus) {
				replaceDocument(url + "?cid=" + cid + "&employeeId=" + employeeId, data);
			},
			error:function(){
				hideProccessBar();
			}
		});
		
	}
}

function deleteEmployeeRole(cid,employeeId,e){
	if($.stopQuickHit(e)){
		$.ajax({
			url:_EMPLOYEEROLE_DELETE_URL,
			data:{
				ids:employeeId
			},
			dataType:'json',
			beforeSend:function(){
				showProccessBar();
			},
			error:function(){
				hideProccessBar();
			},
			success:function(data){
				if(data && data.result){
					$.go(_EMPLOYEEROLE_LIST_URL,{
						dataType:'html',
						success:function(data,textStatus){
							replaceDocument(_EMPLOYEEROLE_LIST_URL,data);
						}
					});
				}else{
					hideProccessBar();
				}
			}
		});
	}
}

function stopPropagation(event) {
	var event = event || window.event;
	if (event.stopPropagation)
		// 因此它支持W3C的 stopPropagation()方法
		event.stopPropagation();
	else
		// 否则，我们需要使用IE的方式来取消事件冒泡
		event.cancelBubble = true;
}